#ifndef TYPE_H
#define TYPE_H


typedef unsigned char       U08;
typedef signed char         S08;
typedef unsigned char       U8;
typedef signed char         S8;
typedef unsigned short int  U16;
typedef signed short int    S16;
typedef unsigned long int   U32;
typedef signed long int     S32;

typedef unsigned char       uint08;
typedef signed char         sint08;
typedef unsigned char       uint8;
typedef signed char         sint8;
typedef unsigned short int  uint16;
typedef signed short int    sint16;
typedef unsigned long int   uint32;
typedef signed long int     sint32;

typedef unsigned char       u08;
typedef signed char         s08;
typedef unsigned char       u8;
typedef signed char         s8;
typedef unsigned char       uchar;
typedef signed char         schar;
typedef unsigned short int  u16;
typedef signed short int    s16;
typedef unsigned long int   u32;
typedef signed long int     s32;

#ifndef bool
    typedef unsigned char   bool;
#endif

#ifndef BOOL
    typedef unsigned char   BOOL;
#endif

#ifndef true
    #define true   1
#endif
#ifndef false
    #define false  0
#endif

#ifndef TRUE
    #define TRUE   1
#endif
#ifndef FALSE
    #define FALSE  0
#endif


#ifndef ON
    #define ON   1
#endif
#ifndef OFF
    #define OFF  0
#endif

#ifndef ENABLE
    #define ENABLE   1
#endif
#ifndef DISABLE
    #define DISABLE  0
#endif

#ifndef OPEN
    #define OPEN   1
#endif
#ifndef CLOSE
    #define CLOSE  0
#endif

#ifndef NULL
	#define NULL	((void *)0)	 
#endif

#define MASK(i)  (1UL<<(i)) 

#define BitSet(a)         ((a) = 1)
#define BitClear(a)       ((a) = 0)
#define ByteSet(a,b)      ((a) = (b))

//#define USE_SH_MCU

#ifdef USE_SH_MCU
    #define _xdata  xdata 
    #define _const  code
#else 
    #define _xdata  
    #define _const  const
#endif

#define API_DEBUG_MODE     1
#if(API_DEBUG_MODE > 0)
#define _static 
#else     
#define _static   static 
#endif

#endif

#include<stdio.h>

